#include <stdio.h>

int main()
{
	int x,i,sum=0,t=0;
	scanf("%d",&x);
	int arr[] = {0};
	for(i = 0;i < x;i++)
	{
		scanf("%d",&arr[i]);
		 t = arr[i];
		if(t%2 == 0)
		{
			sum += t; 
		}
    }
	printf("%d",sum);
	return 0;
 } 
